﻿@model IEnumerable<LyyCMS.Core.Models.Channel>

@{
    ViewData["Title"] = "Index";
}

    <div style="margin:0px 10px; padding:20px 0">
        <a asp-action="Create">
            <i class="fas fa-pencil-alt">
            </i>新建
        </a>
    </div>
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">频道管理</h3>

            <div class="card-tools">
                <button type="button" class="btn btn-tool" data-card-widget="collapse" data-toggle="tooltip" title="Collapse">
                    <i class="fas fa-minus"></i>
                </button>
            </div>
        </div>
        <div class="card-body p-0">
            <table class="table table-striped projects">
                <thead>
                    <tr>
                        <th style="width: 1%">
                            #
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.Title)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.UseName)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.IsEnabled)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.IsComment)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.IsPics)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.IsAnnex)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.SortId)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.Site)
                        </th>
                        <th style="width: 20%">
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var item in Model)
                    {
                    <tr>
                        <td>
                            #
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Title)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.UseName)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.IsEnabled)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.IsComment)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.IsPics)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.IsAnnex)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.SortId)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Site.Name)
                        </td>
                        <td class="project-actions text-right">
                            <a class="btn btn-primary btn-sm" asp-action="Details" asp-route-id="@item.Id">
                                <i class="fas fa-folder">
                                </i>
                                看
                            </a>
                            <a class="btn btn-info btn-sm" asp-action="Edit" asp-route-id="@item.Id">
                                <i class="fas fa-pencil-alt">
                                </i>
                                改
                            </a>
                            <a class="btn btn-danger btn-sm" asp-action="Delete" asp-route-id="@item.Id">
                                <i class="fas fa-trash">
                                </i>
                                删
                            </a>
                        </td>
                    </tr>
                    }
                </tbody>
            </table>
        </div>
        <!-- /.card-body -->
    </div>
<table class="table" style="display:none;">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Title)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.UseName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.IsEnabled)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.IsComment)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.IsPics)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.IsAnnex)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.SortId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Site)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CreationTime)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.DeletionTime)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.IsDeleted)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CreatorUserId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.LastModifierUserId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.LastModificationTime)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.DeleterUserId)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.UseName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsEnabled)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsComment)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsPics)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsAnnex)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.SortId)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Site.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.CreationTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DeletionTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsDeleted)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.CreatorUserId)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LastModifierUserId)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LastModificationTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DeleterUserId)
            </td>
            <td>
                <a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
                <a asp-action="Details" asp-route-id="@item.Id">Details</a> |
                <a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
            </td>
        </tr>
}
    </tbody>
</table>
